package com.biz.primus.commodity.vo.evaluation;


import com.biz.primus.common.enums.PagerEnum;

import java.io.Serializable;

/**
 * 基础分页数据传输对象
 * 
 * Title. <br>
 * Description.
 * <p>
 * Copyright: Copyright (c) 2017年5月13日 下午12:50:54
 * <p>
 * Author: sunaiqiang saq691@126.com
 * <p>
 * Version: 1.0
 * <p>
 */
public class PagerDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2429103848213062131L;

	/**
	 * 页数
	 */
	protected int page = PagerEnum.PAGE_1.getValue();

	/**
	 * 分页大小
	 */
	protected int limit = PagerEnum.LIMIT_10.getValue();

	public int getPage() {
		if (page < 1) {
			page = PagerEnum.PAGE_1.getValue();
		}
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getLimit() {
		if (limit < 1) {
			limit = PagerEnum.LIMIT_10.getValue();
		}
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

}
